
export default {
  props: {
    mode: {
      type: String,
      default: 'DESIGN',
    },
    required: {
      type: Boolean,
      default: false,
    },
    readonly: {
      type: Boolean,
      default: false,
    },
    config: {
      type: Object,
      default: () => {
        return {}
      }
    },
    rowLayout: Number,
    index: Number,
    active: { //是否选中
      type: Object
    },
    modelValue: [Object, Number, Array, String,Boolean]
  },
  data() {
    return {}
  },
  computed: {
    _active: function (props, emit){
      return {
        get() {
          return props.active
        },
        set(val) {
          emit('update:active', val)
        }
      }
    },
    _value: {
      get() {
        return this.modelValue
      },
      set(val) {
        this.$emit('update:modelValue', val)
      },
    },
  },
  emits: ['update:modelValue', 'update:active', 'copy', 'delete'],
}
